/******************************************************************************************
 * Import
 ******************************************************************************************/

// module
import Taro, { Component } from '@tarojs/taro'
import { AtInput, AtForm  }  from 'taro-ui';

// project
import { CPage, CContent, CHeader, CFooter, CFloat, CAround, CBetween, CCenter, CRow, CColumn, CWrap, CLine, CHand, CItemX, CItemY, CText, CLabel, CSvg, CImage, CButton } from '../../../library/comp';
import { Base64, Gen, Time, Zip, Session, Storage, Http } from '../../../library/func';
import Icon from '../../../project/style/icon';
import DoHttp from '../../../project/func/http/http';

/******************************************************************************************
 * Export Class
 ******************************************************************************************/

export default class Presenter extends Component {

	/*------------------------------------------------------------------------------------
	 * 初始化
	 *-----------------------------------------------------------------------------------*/
	constructor(props) {
		super(props);

		/**
		 * state
		 */
		this.state = {
			data:{}
		}
	}

	/*------------------------------------------------------------------------------------
	 * 生命周期
	 *-----------------------------------------------------------------------------------*/
	// didMount
	componentDidMount() {
		DoHttp.get({
			url:'vip/getDist.php',
			data:{},
			success:(data) => {
				this.setState({
					data:data
				})
			}
		})
	}
	
	/*------------------------------------------------------------------------------------
	 * 自定义方法
	 *-----------------------------------------------------------------------------------*/

	config = {
        navigationBarTitleText: '推荐人',
        navigationBarBackgroundColor: '#dd2f3c',
        navigationBarTextStyle: '#fff'
    }


	/*------------------------------------------------------------------------------------
	 * 渲染
	 *-----------------------------------------------------------------------------------*/
	render () {
		return (
			<CPage>
				<CContent>

                    {/* 填写邀请码页面 */}
					<CColumn pt='120' px='30' >
                        <CRow mb='40'>
                            <CText size='32' color='#f75857' >您已绑定推荐人，不可修改推荐关系</CText>
                        </CRow>
                        <CRow bb='2 solid #edeff0' mb='56' h='80' lh='80' >
							<CText color='#aaa' size='32' mr='20' >您的推荐人</CText>
							<CHand color='#393939' size='32' >{this.state.data.vip_name}</CHand>
						</CRow>
                    </CColumn>

				</CContent>

			</CPage>
		)
	}
}


